package com.example.yangyinzhaixian.Fragemt.record;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.yangyinzhaixian.Bean.Recordbean;
import com.example.yangyinzhaixian.R;
import com.example.yangyinzhaixian.uitl.OkHttpClientManager;

/**
 * A simple {@link Fragment} subclass.
 */
public class BlankFragment3 extends Fragment implements View.OnClickListener {

    private Recordbean recordbean;
    private ImageView fragment_image;
    private Button button;
    private TextView fragment3_web;

    public BlankFragment3(Recordbean recordbean) {
        // Required empty public constructor
        this.recordbean = recordbean;
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_blank_fragment3, container, false);
        initView(inflate);
        OkHttpClientManager.displayImage(fragment_image, recordbean.getData().getTeacherAvatar());
        String teacherIntroduce = recordbean.getData().getTeacherIntroduce();
        fragment3_web.setText(teacherIntroduce);
        return inflate;
    }

    private void initView(View inflate) {
        fragment_image = (ImageView) inflate.findViewById(R.id.fragment_image);
        button = (Button) inflate.findViewById(R.id.button);
        button.setOnClickListener(this);
        fragment3_web = (TextView) inflate.findViewById(R.id.fragment3_web);
        fragment3_web.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.button:

                break;
        }
    }
}
